<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>返回星期的日期</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.gregoriantojd.html">« GregorianToJD</a></li>
      <li style="float: right;"><a href="function.jdmonthname.html">JDMonthName »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="ref.calendar.html">日历 函数</a></li>
    <li>返回星期的日期</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="function.jddayofweek" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">JDDayOfWeek</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">JDDayOfWeek</span> &mdash; <span class="dc-title">返回星期的日期</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.jddayofweek-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>jddayofweek</strong></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$julianday</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$mode</code><span class="initializer"> = CAL_DOW_DAYNO</span></span>): <span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span></div>

  <p class="para rdfs-comment">
    返回星期的日期，根据模式不同可能是字符串或是整数。
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.jddayofweek-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt>
<code class="parameter">julianday</code></dt>

     <dd>

      <p class="para">
       一个julian天数。
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">mode</code></dt>

     <dd>

      <table class="doctable table">
       <caption><strong>历法星期模式</strong></caption>
       
        <thead>
         <tr>
          <th>Mode</th>
          <th>Meaning</th>
         </tr>

        </thead>

        <tbody class="tbody">
         <tr>
          <td>0 (默认)</td> 
          <td>
           返回数字形式(0=Sunday, 1=Monday, etc)
          </td>
         </tr>

         <tr>
          <td>1</td> 
          <td>
           返回字符串形式
           (English-Gregorian)
          </td>
         </tr>

         <tr>
          <td>2</td> 
          <td>
           返回缩写形式的字符串
           (English-Gregorian)
          </td>
         </tr>

        </tbody>
       
      </table>

     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.jddayofweek-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   数字或字符串形式的星期数。
  </p>
 </div>

</div></div></div></body></html>